home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / gfx / fu1_62.lha / fu / Rexx / LensAnim.rexx < prev    next >
OS/2 REXX Batch file  |  1995-06-08  |  1KB  |  56 lines

  1. /* FU Arexxtester */
  2.  
  3. options results
  4.  
  5. ADDRESS REXX_FU
  6.  
  7. say 'FU-ArexxAnim';say;
  8.  
  9. SetIter '50';
  10. if RC~=0 then call AppError('SetIter',RC);
  11.  
  12. x1=-2.5;y1=-1.5;x2=1.0;y2=1.5
  13. SetZoom x1 y1 x2 y2;
  14. if RC~=0 then call AppError('SetZoom',RC);
  15.  
  16. xl=1.0;yl=0.5
  17. xlstep=-0.1;ylstep=-0.05
  18.  
  19. frames=30
  20.  
  21. do i=0 to frames
  22.     name='misc:LENS1.'right(i,3,'0');
  23.     say 'Working on : ' name;
  24.     say 'Lens Position : ' xl yl;
  25.  
  26.     SetParam '1' xl yl; 
  27.     if RC~=0 then call AppError('SetParam',RC);
  28.  
  29.     RenderPicture;
  30.     if RC~=0 then call AppError('RenderPicture',RC);
  31.  
  32.     SavePicture name '2'
  33.     if RC~=0 then call AppError('SavePicture',RC);
  34.  
  35.     xl=xl+xlstep;
  36.     yl=yl+ylstep;
  37. end
  38.  
  39. ActivateFU;
  40. if RC~=0 then call AppError('ActivateFU',RC);
  41.  
  42. exit
  43.  
  44. AppError:procedure
  45.     cmd=arg(1);
  46.     ret=arg(2);
  47.     say 'Application Error';say;
  48.     say 'Command 'cmd' failed with Returncode 'ret;
  49.     select
  50.         when ret='1' then say '    => unknown command';
  51.         when ret='2' then say '    => unknown parameter';
  52.         otherwise say '    => unknown returncode';
  53.     end
  54.     say;
  55. return
  56.